
import 'package:flutter/material.dart';
import 'package:flutter_ncsjqz_getx/constant/system.dart';
import 'package:permission_handler/permission_handler.dart';

import '/init/init_sdk.dart';
/// <summary>
/// todo: app 初始化管理
/// author：zwb
/// dateTime： 2021/11/3 11:53
/// filePath： lib/init/init_app.dart
/// desc:
/// <summary>
///
class InitApp{

  /// todo：app初始化类管理
  static initFlutter() async{
    WidgetsFlutterBinding.ensureInitialized();
    /// 安卓沉浸式
    System.immersive();
    /// 竖屏
    System.setHorizontalScreen();
  }

  /// todo：app初始化类管理
  static initSdkManagement() async{
    /// 第三方SDK初始化条件
    if(1==1) {
      await Permission.storage.request();
      await Permission.camera.request();
      await Permission.location.request();
      await Permission.microphone.request();

      InitSdk.rongInit();
      InitSdk.getAppInfo();
      InitSdk.buglyInit();
      InitSdk.gaoDelLocationInit();
      InitSdk.spUtilInit();
      InitSdk.weixinInit();
      regListenerManagement();
    }
  }

  /// todo：注册监听器管理
  static regListenerManagement(){

  }
}